﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RealService
{
    class Program
    {
        static void Main(string[] args)
        {
            //广播消息
            HubServer.SendRealTimeData("ChatHub", "SendAll", "你们好，这是服务端发来的消息");

            //订阅消息
            HubServer.HubSubMsg<string>("ChatHub", "allReceiveUser", RvgMsg);
            Console.ReadKey();
        }
        static void RvgMsg(string msg)
        {
            Console.WriteLine(msg);
        }
    }
}
